﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Web;
using Easy.DAL;

namespace Easy.BLL
{
    public class StringMapBLL
    {
        public String getLookupListbyType(HttpContext context)
        {
            StringMapDAL lookupdal = new StringMapDAL();
            String entityname = context.Request["entityname"];
            String attibutename = context.Request["attributename"];
            String globalname = context.Request["globalname"];
            if (entityname!=null &&entityname!=""&& attibutename!=null &&attibutename!="" )
            {
                 DataTable dt = lookupdal.GetStringMap(entityname, attibutename);
                 return JsonConvert.SerializeObject(dt);

            }
            else if (globalname != null && globalname != "")
            {
                DataTable dt = lookupdal.GetGlobalMap(globalname);
                return JsonConvert.SerializeObject(dt);
            }


            return "";


        }



    }
}
